﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using XStudio.Framework.Common;
using XStudio.WebFramework.Support;

namespace Admin
{
    public class MvcApplication : System.Web.HttpApplication
    {
        public static string SystemName { get; set; }
        public static string SystemInfo { get; set; }

        protected void Application_Start()
        {
            SystemName = HashParameterAppI.GetValue("SysConfig", "SystemName");
            if (string.IsNullOrWhiteSpace(SystemName)) SystemName = HashParameterAppI.GetValue("SysConfig", "SystemNameConfig");
            SystemInfo = HashParameterAppI.GetValue("SysConfig", "SystemInfo");
            if (string.IsNullOrWhiteSpace(SystemInfo)) SystemInfo = HashParameterAppI.GetValue("SysConfig", "SystemInfoConfig");

            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
    }
}
